﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CricketAdmin.master" AutoEventWireup="true" CodeFile="NineEleven.aspx.cs" Inherits="NineEleven" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <style type="text/css">
        body
        {
            font-family: Arial;
            font-size: 10pt;
        }
        .Grid td
        {
            background-color: #A1DCF2;
            color: black;
            font-size: 10pt;
            line-height: 200%;
        }
        .Grid th
        {
            background-color: #3AC0F2;
            color: White;
            font-size: 10pt;
            line-height: 200%;
            text-align: left;
        }
        .ChildGrid td
        {
            background-color: #eee !important;
            color: black;
            font-size: 10pt;
            line-height: 200%;
        }
        .ChildGrid th
        {
            background-color: #6C6C6C !important;
            color: White;
            font-size: 10pt;
            line-height: 200%;
        }
        .Nested_ChildGrid td
        {
            background-color: #fff !important;
            color: black;
            font-size: 10pt;
            line-height: 200%;
            width: 14px;
            font-weight: bold;
        }
        .Nested_ChildGrid th
        {
            background-color: #2B579A !important;
            color: White;
            font-size: 10pt;
            line-height: 200%;
        }
    </style>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("[id*=imgOrdersShow]").each(function () {

                if ($(this)[0].src.indexOf("minus") != -1) {
                    $(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>");
                    $(this).next().remove();
                }
            });
            $("[id*=imgProductsShow]").each(function () {
                if ($(this)[0].src.indexOf("minus") != -1) {
                    $(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>");
                    $(this).next().remove();
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="container-fluid">
        <h3 class="page-title">
            90-11<small></small>
        </h3>
        <div class="alert alert-danger" id="layerError" runat="server" style="display: none;">
        </div>
        <div class="alert alert-success" id="layerSuccess" runat="server" style="display: none;">
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            90-11</div>
                    </div>
                    <div class="portlet-body form">
                        <div class="form-horizontal form-view">
                            <div class="row-fluid">
                                <div class="span12">
                                    <div class="control-group">
                                        <label class="control-label">
                                            Match <span class="required">*</span></label>
                                        <div class="controls">
                                            <asp:DropDownList ID="drpMatch" runat="server">
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please select match"
                                                InitialValue="0" ValidationGroup="SessionReport" CssClass="required" ControlToValidate="drpMatch"
                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-actions">
                                <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="btn red" ValidationGroup="SessionReport"
                                    OnClick="btnSubmit_Click" />
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                    <asp:GridView ID="grdAllCustomers" runat="server" AutoGenerateColumns="false" PageSize="1000"
                                        AllowPaging="true" ShowFooter="true" CssClass="Nested_ChildGrid" Width="100%" OnRowDataBound="grdAllCustomers_RowDataBound">
                                        <Columns>
                                            <asp:BoundField DataField="Over" HeaderText="Over" />
                                            <asp:BoundField DataField="Runs" HeaderText="Runs" />
                                            <asp:BoundField DataField="BettingFor" HeaderText="Betting For" />
                                            <asp:BoundField DataField="Rate" HeaderText="Chips" />
                                            <%--<asp:BoundField DataField="ActualRun" HeaderText="Actual Run" />--%>
                                            
                                            <asp:TemplateField HeaderText="Actual Run">
                                                <HeaderStyle />
                                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                                                <ItemTemplate>
                                                    <br />
                                                    <asp:Label ID="lblActualRun" runat="server" Text='<%#Eval("ActualRun") %>'></asp:Label>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <asp:Label ID="lblTotal" runat="server" Text="Total" ForeColor="Blue"></asp:Label>
                                                </FooterTemplate>
                                            </asp:TemplateField>
                                            <%--<asp:BoundField DataField="BettingAmount" HeaderText="Amount" />--%>
                                            <asp:TemplateField HeaderText="Final Chips">
                                                <HeaderStyle />
                                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                                                <ItemTemplate>
                                                    <br />
                                                    <asp:Label ID="lblFinalAmount" runat="server" Text='<%#Eval("BettingAmount") %>'></asp:Label>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <asp:Label ID="lblFinalTotal" runat="server" Text="0.0" ForeColor="Blue"></asp:Label>
                                                </FooterTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Date" HeaderText="Date" />
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>

